package com.example.test622

import android.annotation.SuppressLint
import android.os.CountDownTimer
import com.alibaba.android.arouter.launcher.ARouter
import com.example.common.mvi.BaseView
import com.example.common.mvi.BaseViewModel
import com.example.test622.databinding.ActivitySplashBinding

@SuppressLint("CustomSplashScreen")
class SplashActivity : BaseView<ActivitySplashBinding,BaseViewModel<*,*>>(){
    override fun initView() {
    
    }
    
    override fun initData() {
        val timer =(object :CountDownTimer(5000,1000){
            @SuppressLint("SetTextI18n")
			override fun onTick(millisUntilFinished: Long) {
                binding.splashTv.text = "倒计时${millisUntilFinished/1000}秒"
            }
            
            override fun onFinish() {
                ARouter.getInstance().build("/splash/login").navigation()
            }
            
        })
        timer.start()
    }
    
}